#include "builder.h"
#include "BMWModel.h"
#include "BenZModel.h"

#include <string>
#include <vector>
#include <iostream>

using namespace std;

Builder::Builder()
{}
 
Builder::~Builder()
{}
 
BuilderBenZ::BuilderBenZ()
{
     this->m_pCCarModel = new CBenZModel();
     cout<<"Builder BenZ!"<<endl;
}
 
 void BuilderBenZ::carStart()
 {
     this->m_pCCarModel->SetSequence("start");
     cout<<"Benz start"<<endl;
 }
 
 void BuilderBenZ::carAlarm()
 {
     this->m_pCCarModel->SetSequence("clarm");
     cout<<"car Alarm"<<endl;
 }
 
 void BuilderBenZ::carStop()
 {
     this->m_pCCarModel->SetSequence("stop");
     cout<<"car Stop"<<endl;
 }

 void BuilderBenZ::carEngineBoom()
 {
     this->m_pCCarModel->SetSequence("engine boom");
     cout<<"car EngineBoom"<<endl;
 }
 
 Product* BuilderBenZ::GetProduct()
 {
     return this->m_pCCarModel;
 }


 
 BuilderBenZ::~BuilderBenZ()
 {
     delete this->m_pCCarModel;
     this->m_pCCarModel = NULL;
 }
 
 BuilderBMW::BuilderBMW()
 {
     this->m_pCCarModel = new CBMWModel();
     cout<<"Builder BMW!"<<endl;
 }
 
 void BuilderBMW::carStart()
 {
     this->m_pCCarModel->SetSequence("start");
     cout<<"BMW start"<<endl;
 }
 
 void BuilderBMW::carAlarm()
 {
     this->m_pCCarModel->SetSequence("alarm");
     cout<<"BMW Alarm"<<endl;
 }

 void BuilderBMW::carEngineBoom()
 {
     this->m_pCCarModel->SetSequence("engine boom");
     cout<<"BMW EngineBoom"<<endl;
 }
 
 void BuilderBMW::carStop()
 {
     this->m_pCCarModel->SetSequence("stop");
     cout<<"car Stop"<<endl;
 }
 
 Product* BuilderBMW::GetProduct()
 {
     return this->m_pCCarModel;
 }
 
 BuilderBMW::~BuilderBMW()
 {
     delete this->m_pCCarModel;
     this->m_pCCarModel = NULL;
 }
 